/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fallen.deck.entity;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author Carlos S. Moreno <CarlosS.Moreno@gmail.com>
 */
public class Deck implements Comparable, Serializable {

    private long id;
    private String name;
    private Card demon;
    private List cards;
    private String notes;

    public Deck()
    {
        this.name="No Name";
        
    }
    
    public Deck(String name, Card demon)
    {
        this.name = name;
        this.demon = demon;
    }

    /**
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the demon
     */
    public Card getDemon() {
        return demon;
    }

    /**
     * @param demon the demon to set
     */
    public void setDemon(Card demon) {
        this.demon = demon;
    }

    /**
     * @return the cards
     */
    public List getCards() {
        return cards;
    }

    /**
     * @param cards the cards to set
     */
    public void setCards(List cards) {
        this.cards = cards;
    }
    
    public String toString()
    {
        return getName();
    }

    @Override
    public int compareTo(Object o) {
        if (!(o instanceof Deck)) return -1;
        return this.getName().compareTo(((Deck)o).getName());
    }

    /**
     * @return the notes
     */
    public String getNotes() {
        return notes;
    }

    /**
     * @param notes the notes to set
     */
    public void setNotes(String notes) {
        this.notes = notes;
    }
    
}
